<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">

<body>
    <!-- 左侧导航 -->
    <div class="left_boxwrap">
        <div class="user_head">
            <img th:if="${#authentication.principal.portrait ne null}" th:src="${#request.getAttribute('uploadServer')} + ${#authentication.principal.portrait}">
            <img th:if="${#authentication.principal.portrait eq null and #authentication.principal.gender eq 0}" th:src="${#request.getAttribute('ctx') + '/static/front/img/gender/portrait-female.jpg'}"/>
            <img th:if="${#authentication.principal.portrait eq null and #authentication.principal.gender eq 1}" th:src="${#request.getAttribute('ctx') + '/static/front/img/gender/portrait-male.jpg'}"/>
            <p sec:authentication="principal.nickname"></p>
        </div>
        <div class="left_box_nav">
            <dl class="parent_nav">
                <dt>设置<i class="iconfont icon-more"></i></dt>
                <dd>
                    <ul class="find_nav">
                        <a th:href="@{/personal}" data-item-active="personal-info/personal-edit">
                            <li>
                                个人信息
                            </li>
                        </a>
                        <a th:href="@{/personal/safe}" data-item-active="personal-safe">
                            <li>
                                安全设置
                            </li>
                        </a>
                    </ul>
                </dd>
            </dl>
            <dl class="parent_nav">
                <dt>我的订单<i class="iconfont icon-more"></i></dt>
                <dd>
                    <ul class="find_nav">
                        <a th:href="@{/order/list/0}" data-item-active="order-list-0">
                            <li>
                                全部订单
                            </li>
                        </a>
                        <a th:href="@{/order/list/1}" data-item-active="order-list-1">
                            <li>
                                已完成
                            </li>
                        </a>
                        <a th:href="@{/order/list/2}" data-item-active="order-list-2">
                            <li>
                                待付款
                            </li>
                        </a>
                        <a th:href="@{'/order/list/1?statusStep=0'}">
                            <li>
                                待评价
                            </li>
                        </a>
                    </ul>
                </dd>
            </dl>
            <dl class="parent_nav">
                <dt>我的收藏<i class="iconfont icon-more"></i></dt>
                <dd>
                    <ul class="find_nav">
                        <a th:href="@{'/personal/collect/1/2?contentType=4'}">
                            <li>
                                摄影师
                            </li>
                        </a>
                        <a th:href="@{'/personal/collect/1/2?contentType=5'}">
                            <li>
                                编剧
                            </li>
                        </a>
                        <a th:href="@{/personal/collect/2/2}">
                            <li>
                                作品
                            </li>
                        </a>
                    </ul>
                </dd>
            </dl>
            <dl class="parent_nav">
                <dt>我的评价<i class="iconfont icon-more"></i></dt>
                <dd>
                    <ul class="find_nav">
                        <a th:href="@{'/evaluate/list/1?method=1'}" data-item-active="evaluate-list-1">
                            <li>
                                待评价
                            </li>
                        </a>
                        <a th:href="@{'/evaluate/list/2?method=1'}" data-item-active="evaluate-list-2">
                            <li>
                                已评价
                            </li>
                        </a>
                    </ul>
                </dd>
            </dl>
            <dl class="parent_nav">
                <dt>优惠券<i class="iconfont icon-more"></i></dt>
                <dd>
                    <ul class="find_nav">
                        <a th:href="@{/personal/discountcoupon}">
                            <li>
                                我的优惠券
                            </li>
                        </a>
                    </ul>
                </dd>
            </dl>
            <dl class="parent_nav">
                <dt>发票中心<i class="iconfont icon-more"></i></dt>
                <dd>
                    <ul class="find_nav">
                        <a th:href="@{/personal/receipt}" data-item-active="receipt-apply">
                            <li>
                                我的发票
                            </li>
                        </a>
                    </ul>
                </dd>
            </dl>
        </div>
    </div>

    <script>
        function activeLeft(menu) {
            $('.left_boxwrap .left_box_nav a').each(function () {
                if ($(this).attr('data-item-active') != undefined && $(this).attr('data-item-active') != ''
                    && $(this).attr('data-item-active').indexOf(menu) > -1) {
                    $(this).children().addClass('on');
                    $(this).parent().parent().stop().slideDown();
                }
            })
        }
    </script>

</body>
</html>